<template>
    <view class="imgPage u-skeleton">
		<block v-for="(item, index) in book_list" :key="index">
			<image class="imgs boxShow u-skeleton-rect" mode="widthFix" :src="item" :lazy-load="true"></image>
		</block>
        <share-btn :display="scrollAnimate"></share-btn>
    </view>
</template>

<script>
	export default {
      data() {
          return {
            book_list: [],
            scrollAnimate: false,
          }
      },
      onLoad(options){
        this.$api.request({
          url: `/public/api/book`,
        }).then(data => {
          if(data.status === 0){
            this.book_list = data.detail;
          }
        })
      },
		
      //分享,webViewUrl为webView的url
      onShareAppMessage(res) {
        return {
          title: "购房指南",
          imageUrl: 'https://image.srea.org.cn/xcx/share-zhinan.jpg',
          desc: '',
          path: `/pages/menus/tools/open-doc/doc`,
          //#ifdef MP-TOUTIAO
          templateId: '',
          //#endif
        }
      },
      onPageScroll() {
          const that = this;
          that.scrollAnimate = true;
          this.$u.debounce(function() {
              that.scrollAnimate = false;
          }, 500);
      }
  }
</script>

<style lang="scss">
.imgPage{
	background-color: #FFFFFF;
	.imgs{
		width: 100%;
	}
}
</style>
